//
//  CategoryParser.m
//  EasyBuy
//
//  Created by Zhu Xiangjun on 10/10/12.
//  Copyright (c) 2012 shen donghao. All rights reserved.
//

#import "CategoryParser.h"

@implementation CategoryParser

-(NSArray *)excuteToObjects:(NSDictionary *)itemFeeds{
    
    NSMutableArray *feedsArray = [[NSMutableArray alloc] init];
    
    NSArray *typeList = [itemFeeds objectForKey:@"type_list"];
    
    int count = [typeList count];
    
    for ( int i = 0 ; i < count ; i++){
        
        NSDictionary *itemDic = [typeList objectAtIndex:i];
        
        CategoryData *categoryData = [[CategoryData alloc]init];
        categoryData.typeid = [[itemDic objectForKey:@"typeid"] intValue];
        categoryData.typeicon = [itemDic objectForKey:@"typeicon"];
        categoryData.typetitle = [itemDic objectForKey:@"typetitle"];
        
        [feedsArray addObject:categoryData];
        [categoryData release];
    }
    
    return feedsArray;
}

@end
